1. How can I use a C program running on KFLOP to cause a GCode program in KMotionCNC to run? I want to monitor an input bit and start the GCode program when an external switch is momentarily pressed.
2. Is there a way to have a C program running on KFLOP select which GCode program is selected in KMotionCNC? I'd like to have several programs loaded in KMotionCNC files 1 thru 5, and be able to start different ones at different times from the C program.
Thanks,
Hugh
Group: DynoMotion
Message: 8691
From: Tom Kerekes
Date: 11/19/2013
Subject: Re: Cycle start from C program
Hi Hugh,
Regarding:
#1 - See KFLOPtoPCCmdExamples.c for DoPC(PC_COMM_EXECUTE);
#2 - We don't have a way to select GCode Files from KFLOP. A kludge workaround might be to use one big GCode Program with all 5 programs added as subroutines. There is a capability in the GCode Interpreter to call a subroutine N times. N could be a variable set by KFLOP as 0 or 1. See the example SubroutineWithConditionals.ngc
Regards
TK
Group: DynoMotion
Message: 8692
From: Hugh Sontag
Date: 11/19/2013
Subject: Re: Cycle start from C program
Hi Tom,
Thanks for the pointers. I'm waiting for a replacement Z axis. I suspect that it's causing the faults.
Hugh
On Tue, Nov 19, 2013 at 8:15 PM, Tom Kerekes <tk@...> wrote:
Hi Hugh,
Regarding:
#1 - See KFLOPtoPCCmdExamples.c for DoPC(PC_COMM_EXECUTE);
#2 - We don't have a way to select GCode Files from KFLOP. A kludge workaround might be to use one big GCode Program with all 5 programs added as subroutines. There is a capability in the GCode Interpreter to call a subroutine N times. N could be a variable set by KFLOP as 0 or 1. See the example SubroutineWithConditionals.ngc